// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import API from './API'

const getImg = (name) => CORE.common(`maintain/backup/${name}.png`)
const keyList = ['amount', 'type', 'total']
const titleList = ['总金额', '库存分类', '库存总量']
const unitList = ['￥', '类', '件']
const valueList = [0, 0, 0]

// ============================== 导出状态集 ============================== //

export default {
  // —————————————————————————————— 常量状态 —————————————————————————————— //

  /**
   * 接口
   */
  API,

  /**
   * 映射
   */
  MAP: {
    WORD: '统计数量', // 词语
    INFO: '', // 信息
  },

  /**
   * 初始信息
   *
   * 1. 初始存在，才能响应
   * 2. setInfo() 合并时使用
   */
  INIT_INFO: {
    iconList: keyList.map((img) => getImg(`${img}-icon`)),
    bgList: keyList.map((img) => `url(${getImg(`${img}-bg`)})`),
    keyList,
    titleList,
    unitList,
    valueList,
  },
}
